All Questions
4 questions
0votes
1answer
170views
Using sed to search multiple strings in XML file
I need to filter a big file XML and find the string using a multiple conditions. I need a filter a email if cnisfCF equal true and natg_passwordAlreadyResetedPostMigration is true. Anyone can help ? &...
-2votes
2answers
776views
sed giving me this error: … unknown command: `
I have code which will replace the xml tag at a particular line number LineNum=`grep -n "Deep" file.xml | cut -d: -f 1 | awk -F '[\t]' '{$NF = $NF -1;}1'` sed "${LineNum}s#^<...
-2votes
1answer
400views
sed XML parse select text between tags with special characters while deleting other blocks
I am trying to parse an XML which consists of blocks between <JOB> and </JOB> , I am parsing within a do while loop , while reading the block between <JOB> and </JOB> , I am ...
4votes
1answer
4kviews
How to replace "&" with "&" except when already part of an XML entity?
I have a file (xml) with many &/</>/etc, but sometimes also some & characters by themselves. I want to change this symbol to & without replacing the others. cat ...